"""
Case Type   : 资源池化
Case Name   : gs_collector 显示帮助信息（正常）
Create At   : 2024.01
Owner       : chen
Description :
    1、gs_collector -?
    2、gs_collector --help
Expect      :
    1、显示正常
    2、显示正常
"""

import os
import unittest
from testcase.utils.Common import Common
from testcase.utils.Constant import Constant
from testcase.utils.Logger import Logger
from yat.test import Node
from yat.test import macro


class SharedStorage(unittest.TestCase):

    def setUp(self):
        self.log = Logger()
        self.log.info(f'-----{os.path.basename(__file__)} start-----')
        self.constant = Constant()
        self.com = Common()
        self.pri_node = Node('PrimaryDbUser')

    def test_shared_storage(self):
        text = '-----step1: gs_collector -?' \
            ' expect: 显示正常-----'
        self.log.info(text)
        res = self.pri_node.sh(f'''source {macro.DB_ENV_PATH};
                             gs_collector -?''').result()
        self.log.info(res)

        text = '-----step2: gs_collector --help' \
            ' expect: 显示正常-----'
        self.log.info(text)
        res = self.pri_node.sh(f'''source {macro.DB_ENV_PATH};
                             gs_collector --help''').result()
        self.log.info(res)

    def tearDown(self):
        self.log.info(f'-----{os.path.basename(__file__)} end-----')